import i18n from '@/lang';
import { LOCAL_KEY } from '@/constant/dict';

export const LOGIN_PASSWORD = 'B620C3278F1DAC02';

/**
 * 向导路由枚举
 */
export const WIZARD_ROUTE = {
    Wizard: 'wizard',
    ConnectionDetection: '/wizard/ConnectionDetection',
    BasicSettings: '/wizard/BasicSettings',
    Completed: '/wizard/Completed'
};

/**
 * 设置路由向导历史记录
 * @param {String} path
 */
export const setWizardHistory = (path) => {
    localStorage.setItem(LOCAL_KEY.IS_WIZARD_HISTORY, path);
};

/**
 * 清理路由向导历史记录
 */
export const clearWizardHistory = () => {
    localStorage.removeItem(LOCAL_KEY.IS_WIZARD_HISTORY);
};

// 文本
export const textObj = () => {
    let obj = {
        pageTitle: i18n.t('wizard.wizardMsg'),
        noSimTips: i18n.t('wizard.noSimTips'),
        completedTips: i18n.t('wizard.completedMsg'),
        congratulations: i18n.t('wizard.version2.congratulations')
    };

    return obj;
};
